@layout("/common/_curd/_container.html"){

<script type="text/javascript">
	var ctx = "${basePath}";
	var grid_selector = "#grid-table";
	var pager_selector = "#grid-pager";
	
	$(function(){
		initGrid();
		initMenuBtn("btns", "${code}");
	});
	
	function initGrid(){
		var grid_url = ctx + "/${code}/list";
		var _colnames = [
						"单位名称", 
						"办公地址", 
						"项目名称", 
						"部门联系人", 
						"单位", 
						"电话", 
						"手机", 
						"开发单位联系人", 
						"单位", 
						"电话", 
						"手机", 
						"应用1名称", 
						"虚拟机数量", 
						"应用2名称", 
						"虚拟机数量", 
						"应用3名称", 
						"虚拟机数量", 
						"开通时间", 
						"备注"
		];
		var _colmodel = [
						{name:"dept_name", index:"dept_name", width:100},
						{name:"address", index:"address", width:100},
						{name:"pro_tname", index:"pro_tname", width:100},
						{name:"host_name", index:"host_name", width:100},
						{name:"host_dept", index:"host_dept", width:100},
						{name:"host_tel", index:"host_tel", width:100},
						{name:"host_phone", index:"host_phone", width:100},
						{name:"dev_name", index:"dev_name", width:100},
						{name:"dev_dept", index:"dev_dept", width:100},
						{name:"dev_tel", index:"dev_tel", width:100},
						{name:"dev_phone", index:"dev_phone", width:100},
						{name:"app1_name", index:"app1_name", width:100},
						{name:"app1_num", index:"app1_num", width:100},
						{name:"app2_name", index:"app2_name", width:100},
						{name:"app2_num", index:"app2_num", width:100},
						{name:"app3_name", index:"app3_name", width:100},
						{name:"app3_num", index:"app3_num", width:100},
						{name:"indate", index:"indate", width:100},
						{name:"remarks", index:"remarks", width:100}
		];
		
		jQuery(grid_selector).jqGrid({
			url : grid_url,
		    shrinkToFit : true,
			colNames : _colnames,
			colModel : _colmodel, 
			jsonReader : {id :"id"},
			pager : pager_selector,
			postData : {sort : "id", order : "desc"}
		});
	}
</script>


	<!-- 配置 grid -->
	<div class="row">
		<div class="col-xs-12 tb-grid">
			<!-- 配置 查询 -->
			@ var _col=[{name:"单位名称", index:"dept_name", type:"text"},
			@		{name:"办公地址", index:"address", type:"text"},
			@		{name:"项目名称", index:"pro_tname", type:"text"},
			@		{name:"部门联系人", index:"host_name", type:"text"},
			@		{name:"单位", index:"host_dept", type:"text"},
			@		{name:"电话", index:"host_tel", type:"text"},
			@		{name:"手机", index:"host_phone", type:"text"},
			@		{name:"开发单位联系人", index:"dev_name", type:"text"},
			@		{name:"单位", index:"dev_dept", type:"text"},
			@		{name:"电话", index:"dev_tel", type:"text"},
			@		{name:"手机", index:"dev_phone", type:"text"},
			@		{name:"应用1名称", index:"app1_name", type:"text"},
			@		{name:"虚拟机数量", index:"app1_num", type:"text"},
			@		{name:"应用2名称", index:"app2_name", type:"text"},
			@		{name:"虚拟机数量", index:"app2_num", type:"text"},
			@		{name:"应用3名称", index:"app3_name", type:"text"},
			@		{name:"虚拟机数量", index:"app3_num", type:"text"},
			@		{name:"开通时间", index:"indate", type:"text"},
			@		{name:"备注", index:"remarks", type:"text"}
			@];
			@ include("/common/_function/_search.html",{"col":_col}){}
			<!-- 按钮 -->
			<div class="welljq well-sm" id="btns"></div>
			<!-- grid -->
			<table id="grid-table"></table>
			<!-- 分页-->
			<div id="grid-pager"></div>
		</div>
	</div>
	
	<!-- 引入所需的js -->
	@include("/common/_listscript.html"){}
	
@}	